<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<a href="/depart/add" target="_blank">添加部门</a>
<table class="table">
    <thead>
    <tr>
        <th scope="col">id</th>
        <th scope="col">名称</th>
        <th scope="col">操作</th>
    </tr>
    </thead>
<tbody>
{% for obj in queryset %}
<tr>
    <th scope = "row">{{ obj.department_id}}</th>
        <td>{{ obj.title }}</td>
        <td>
            <a href="/depart/{{ obj.department_id}}/edit">编辑</a>
            <a href="/depart/delete/?nid={{ obj.department_id }}" onclick="return confirm('确定要删除吗？');">删除</a>
        </td>
</tr>
{% endfor %}
</tbody>
    </table>
</body>
</html>